<include target="header.include.html" />


<div class="leftclass">
	<include target="category.include.html" />

	<table cond="$is_logged" class='pointFont'>
		<thead>
			<tr>
				<td class="pointFont titleName">{$lang->user}:</td><td>{$logged_info->nick_name}</td>
				<td class="pointFont titleName" style="padding-left:5px">{$lang->point}:</td><td class="pointNumFont">{number_format(intval($document_top['userPoint']->point))}</td>
			</tr>
		</thead>
	</table>

	<div class="kinTabBox">
		<ul class="kinTab">
			<li class="noLine <!--@if(!$type)-->selected<!--@end-->">
				<a cond="$search_keyword" href="{getUrl('page',1,'type','')}">{$lang->search_result}</a>
				<a cond="!$search_keyword" href="{getUrl('page',1,'type','')}">{$lang->kin_all_questions}</a>
			</li>
			<li class="selected"|cond="$type=='questions'"><a href="{getUrl('page',1,'type','questions')}">{$lang->kin_main_tabs[2]}</a></li>
			<li class="selected"|cond="$type=='replies'"><a href="{getUrl('page',1,'type','replies')}">{$lang->kin_main_tabs[3]}</a></li>
			<li class="selected"|cond="$type=='selected'"><a href="{getUrl('page',1,'type','selected')}">{$lang->kin_main_tabs[4]}</a></li>
			<li cond="$is_logged" class="selected"|cond="$type=='my_questions'"><a href="{getUrl('page',1,'type','my_questions')}">{$lang->kin_main_tabs[5]}</a></li>
			<li cond="$is_logged" class="selected"|cond="$type=='my_replies'"><a href="{getUrl('page',1,'type','my_replies')}">{$lang->kin_main_tabs[6]}</a></li>
		</ul>
		<div cond="$page_navigation" class="status">
			{number_format($page_navigation->total_count)}, {$page}/{number_format($page_navigation->total_page)} pages
		</div>
	</div>

	<div class="listBox">
	<!--@if(count($document_list) || count($reply_list))-->
		<table cellspacing="0">
		<thead>
		<tr>
			<th cond="$module_info->use_category == 'Y'" class="category">{$lang->ask_category}</th>
			<th class="title">{$lang->title}</th>
			<th cond="$type !='my_questions'" class="author">{$lang->writer}</th>
			<th class="date">{$lang->regdate}</th>
		</tr>
		</thead>
		<tbody>
		<!--@if($document_list)-->
			<tr loop="$document_list => $oDocument">
				<th cond="$module_info->use_category == 'Y'" class="category">
					<a cond="$oDocument->get('category_srl')" href="{getUrl('category_srl',$oDocument->get('category_srl'))}">{$categories[$oDocument->get('category_srl')]->title}</a>
					<block cond="!$oDocument->get('category_srl')">
						&nbsp;
					</block>
				</th>
				<td class="title">
					<span class="pointGift">{number_format($document_kins[$oDocument->document_srl])}</span>
					<a href="{getUrl('','document_srl',$oDocument->document_srl,'search_keyword',$search_keyword)}">{$oDocument->getTitle()}</a>
					<span cond="$oDocument->getCommentCount()">{$oDocument->getCommentCount()}</span>
					<span class="reply" loop="$comment_count => $come" cond="$come->parent_srl == $oDocument->document_srl">
						{$come->count}</span>
				</td>
				<td cond="$type!='my_questions'" class="author"><a href="#" onclick="return false;" class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickname()}</a></td>
				<td class="date">{$oDocument->getRegdate("y.m.d")}</td>
			</tr>
		<!--@elseif($reply_list)-->
			<tr loop="$reply_list => $oReply">
				<th cond="$module_info->use_category == 'Y'" class="category">
					<a cond="$oReply->get('category_srl')" href="{getUrl('category_srl',$oReply->get('category_srl'))}">{$categories[$oReply->get('category_srl')]->title}</a>
					<block cond="!$oReply->get('category_srl')">
						&nbsp;
					</block>
				</th>
				<td class="title">
					<span class="pointGift">{number_format($document_kins[$oReply->get('document_srl')])}</span>
					<a href="{getUrl('','document_srl',$oReply->get('document_srl'))}#comment_{$oReply->get('comment_srl')}">{$oReply->getSummary(70)}</a>
					<span class="reply" loop="$comment_count => $come" cond="$come->parent_srl == $oReply->comment_srl">{$come->count}</span>
				</td>
				<td cond="$type!='my_questions'" class="author"><a href="#" onclick="return false;" class="member_{$oReply->get('member_srl')}">{$oReply->getNickName()}</a></td>
				<td class="date">{$oReply->getRegdate("y.m.d")}</td>
			</tr>
		<!--@end-->
		</tbody>
		</table>

		<div class="rightButtonBox">
			<a href="{getUrl('act','dispKinWrite','document_srl','')}" class="button black strong"><span>{$lang->cmd_ask}</span></a>
		</div>

		<div class="pagination">
			<a href="{getUrl('page','')}" class="prevEnd">{$lang->first_page}</a>
			<!--@while($page_no = $page_navigation->getNextPage())-->
				<!--@if($page == $page_no)-->
					<strong>{$page_no}</strong>
				<!--@else-->
					<a href="{getUrl('page',$page_no)}">{$page_no}</a>
				<!--@end-->
			<!--@end-->
			<a href="{getUrl('page',$page_navigation->last_page)}" class="nextEnd">{$lang->last_page}</a>
		</div>

		<!-- 검색 -->

        <include target="search.html" />
	<!--@else-->
		<p class="none">
			<strong>
			<span>{$lang->category} :</span>
			<block cond="!$type">{$lang->kin_all_questions}</block>
			<block cond="$type=='questions'">{$lang->kin_main_tabs[2]}</block>
			<block cond="$type=='replies'">{$lang->kin_main_tabs[3]}</block>
			<block cond="$type=='selected'">{$lang->kin_main_tabs[4]}</block>
			<block cond="$type=='my_questions' && $is_logged">{$lang->kin_main_tabs[5]}</block>
			<block cond="$type=='my_replies' && $is_logged">{$lang->kin_main_tabs[6]}</block>
			<block cond="$search_keyword">
				<span>, {$lang->search_keyword} :</span>
				{htmlspecialchars($search_keyword)}
			</block>
			</strong>
			{$lang->msg_no_article}
		</p>
		<include target="search.html" />
		<div class="rightButtonBox">
			<a href="{getUrl('act','dispKinWrite','document_srl','')}" class="button black strong"><span>{$lang->cmd_ask}</span></a>
		</div>
	<!--@end-->
	</div>
</div><!--end leftclass-->

<div class="content_bottom">
	<include target="toplist.html" />
</div>

<include target="footer.include.html" />
